<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>if..else语句</title>        
        <script>       
          //0为星期日,依次类推
          var dayOfWeek = 3;
          if (dayOfWeek == 0) {
              console.log('星期日');
          } else if(dayOfWeek == 1){
              console.log('星期一');
          } else if(dayOfWeek == 2){
              console.log('星期二');
          } else if(dayOfWeek == 3){
              console.log('星期三');
          } else if(dayOfWeek == 4){
              console.log('星期四');
          } else if(dayOfWeek == 5){
              console.log('星期五');
          } else if(dayOfWeek == 6){
              console.log('星期六');
          }
        </script>
    </head>
    <body>
    </body>
</html>



